package com.service;

import com.dto.UserDTO;
import com.pojo.Result;
import com.pojo.Users;

import java.util.List;

public interface UserService {
    Result<Users> register(Users user);
    Result<Users> login(String username, String password);
    Result<Users> getUserById(Long id);
    Result<Void> updateUser(Users user);
    Result<Void> updateAvatar(Long id, String avatarUrl);
    Result<Void> updatePassword(Long id, String oldPassword, String newPassword);
    Result<Void> updateBio(Long id, String bio);
    Result<Void> deleteUser(Long id);
    Result<List<Users>> getAllUsers(int page, int size);
    Result<Boolean> checkUsernameAvailable(String username);
    Result<Boolean> checkEmailAvailable(String email);
    Result<UserDTO> getUserDTOById(Long id);
    Users getByEmail(String email);

    void sendCode(String email);
}